﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DQYT.HTDZ.Model;

namespace DQYT.HTDZ.IDAL
{
    public interface IBDMenu
    {
        #region  Method

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(int MNU_ID);


        /// <summary>
        /// 增加一条数据
        /// </summary>
        bool Add(BDMenuModel model);
        /// <summary>
        /// 更新一条数据
        /// </summary>
        bool Update(BDMenuModel model);

        /// <summary>
        /// 删除一条数据
        /// </summary>
        bool Delete(int MNU_ID);
        /// <summary>
        /// 批量删除数据
        /// </summary>
        bool DeleteList(string MNU_IDlist);


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        BDMenuModel GetModel(int MNU_ID);

        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetList(string strWhere);

        /// <summary>
        /// 获取记录总数
        /// </summary>
        int GetRecordCount(string strWhere);
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex);



        #endregion  Method

        #region 新添加
        /// <summary>
        /// 获得菜单根据角色ID
        /// </summary>
        /// <param name="JSE_ID">角色ID</param>
        /// <returns>返回菜单数据表</returns>
        DataTable GetMenu(int JSE_ID, int parentId);

        /// <summary>
        /// 获得页面标题路径
        /// </summary>
        /// <param name="MNU_ID">菜单ID</param>
        /// <returns></returns>
        string GetTitlePath(string MNU_ID);

        /// <summary>
        /// 获得记录数
        /// </summary>
        /// <param name="strWhere">查询条件</param>
        /// <returns></returns>
        int GetNum(string strWhere);
        /// <summary>
        /// 获得下一个最大值
        /// </summary>
        /// <returns></returns>
        int GetNextID();
        #endregion
    }
}
